package com.finger.educms.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.finger.commonutils.R;
import com.finger.educms.entity.CrmBanner;
import com.finger.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * banner表接口，前端页面使用
 */
@RestController
@RequestMapping("/educms/bannerfront")
@CrossOrigin
public class BannerFrontController {
    @Autowired
    private CrmBannerService crmBannerService;

    @GetMapping("/getAllBanner")
    public R getAllBanner(){

        List<CrmBanner> list = crmBannerService.selectAllBanner();

        return R.ok().data("items",list);
    }
}
